
class HTTP {
    static request(){
        return new Promise((resolve,reject)=>{
            wx.request({
                url:"http://gank.io/api/today",
                data: {},
                method:"GET",
                header: {'content-type':'application/json'},
                dataType: 'json',
                responseType: 'text',
                success: (res) => {
                    resolve(res);
                },
                fail: (err) => {
                    reject(err);
                }
            });
              
        })
    }
}
module.exports=HTTP